import threading
import time


def method1(param):
    for i in range(10):
        print(f"此线程是{threading.current_thread().name} 循环次数{i} 参数{param}")


# 这执行顺序是随机的 线程是异步的 无序的
if __name__ == '__main__':
    lst = []
    for i in range(10):
        t = threading.Thread(target=method1, args=(i,))
        lst.append(t)
    for e in lst:
        e.start()
    for e in lst:
        e.join()
